#pragma once
#ifndef EUCLIENTGUI_INIFILE_H
#define EUCLIENTGUI_INIFILE_H
#endif
#include <atlstr.h>
#include <Shlwapi.h>
#include <Windows.h>
#pragma comment(lib, "shlwapi.lib")
#pragma warning(disable:4996)

static const TCHAR szBlank[] = TEXT("");
class CIniFile
{
public:
	CString m_IniFilePath;
public:
	CIniFile(CString m_pszProfileName);
	~CIniFile(void);
	BOOL Open(CString m_pszIniFileName);
	BOOL Close();
	CString GetProfileString(LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault = szBlank);
	UINT GetProfileInt(LPCTSTR lpszSection, LPCTSTR lpszEntry, int nDefault = 0);
	BOOL WriteProfileString(LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszValue = szBlank);
	BOOL WriteProfileInt(LPCTSTR lpszSection, LPCTSTR lpszEntry, int nValue = 0);
	BOOL FileExist(CString FilePath);
};